package odgs.app.common;

import java.awt.Component;

import javax.swing.JTable;
import javax.swing.SwingConstants;
import javax.swing.table.DefaultTableCellRenderer;

public class AlignedTableCellRenderer extends DefaultTableCellRenderer 
{ 
    public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus,int row, int column) 
    { 
    	super.getTableCellRendererComponent(table, value, isSelected, hasFocus, row, column);
    	if(column == 0)
    	{
    		this.setHorizontalAlignment(SwingConstants.LEADING);
    	}
    	else
    	{
    		this.setHorizontalAlignment(SwingConstants.CENTER);
    	}
	    return this; 
     }
}